/*************************************************************************
 *                                                                       *
 * This file is part of the FreeMAPs distribution.  For full copyright   *
 * information, see COPYRIGHT and COPYING.LESSER.                        *
 *                                                                       *
 * Author:           sqbang                                              *
 * Email:            sqbang@ustc.edu                                     *
 * Date:             2011.03.31                                          *
 *                                                                       *
 *************************************************************************/

#ifndef FreeMAPs_include_COMMON_info_WriterInfo_h
#define FreeMAPs_include_COMMON_info_WriterInfo_h

#include "FreeMAPsConfig.h"

//COMMON headers
#include "COMMON/base/StateIndicator.h"
#include "COMMON/base/Common.h"


namespace FreeMAPs
{

/**
 * @brief the writer information
 * this class tell which writer is used, and how.
 * writer is the pointer to the post-solver soft such as visit, vtk, tecplot... etc
 */
class WriterInfo : public StateIndicator
{
public:

    explicit
    WriterInfo(
        const std::string& object_name);

    ~WriterInfo();

public:

    inline const std::string&
    get_writer_types() const;

    inline void
    set_writer_types(const std::string& writer_types);

    void
    clear();

    /**
     * @brief build this class from file
     * @param db contains infomation to build this class
     */
    void
    get_from_input (
        const InputDatabase* db);

    friend std::ostream&
    operator << (
        std::ostream& os,
        const WriterInfo& rhs);

    bool
    check_all_info_db(const InputDatabase* db);


private:

    typedef StateIndicator Parent;

    std::string d_writer_types;

private:

    DISALLOW_COPY_AND_ASSIGN (WriterInfo);
};

} //namespace FreeMAPs

#include "COMMON/info/WriterInfo.inl"

#endif
